package com.lagou.config;

import org.apache.commons.dbutils.QueryRunner;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.*;
import org.springframework.test.context.ContextConfiguration;

import javax.sql.DataSource;

/**
 * @program: spring_transfer
 * @description:
 * @author: Mr.Wang
 * @create: 2020-12-16 09:40
 **/

@Configuration
@ComponentScan("com.lagou")
@Import(DataSourceConfig.class)
@EnableAspectJAutoProxy
public class SpringConfig {

	@Bean("queryRunner")
	public QueryRunner getQueryRunner(@Autowired DataSource dataSource){
		return new QueryRunner(dataSource);
	}

}
